import React from 'react'
import './seckil.less'
import {Link} from 'react-router-dom'
import { Carousel } from 'antd-mobile';

function Seckil(props) {
    let {seckillist} = props
    return (
        <div className="seckil">
        <h2 className="text">限时秒杀</h2>
        <Carousel
            autoplay={true}
            infinite
            autoplayInterval={1800}
            dots={false}
        >
            {seckillist.map((item, index) => (
                <Link
                    key={item.id}
                   to={"/detail/"+item.id + '/1'}
                >
                    <img
                        title={item.goodsname}
                        src={item.img}
                        alt=""
                        style={{ width: '100%', verticalAlign: 'top' }}
                    />
                    <p className="price_text">{item.goodsname}</p>
                    <p>￥{item.price}元</p>
                    <del>￥{item.market_price}</del>
                </Link>

            ))}
        </Carousel>
    </div>
    )
}
export default React.memo(Seckil)
